package cn.com.dhcc.turbo.entity.registry.wapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import cn.com.dhcc.app.core.handler.dbhandler.WappedResultSet;
import cn.com.dhcc.turbo.entity.registry.SynchronizeInfo;

public class SynchronizeInfoRowWapper  implements RowMapper<SynchronizeInfo> {
	@Override
	public SynchronizeInfo mapRow(ResultSet rss, int rowNum) throws SQLException {
		WappedResultSet rs = new WappedResultSet(rss);
		SynchronizeInfo vo = new SynchronizeInfo();
		vo.setId(rs.getString("id"));
		vo.setSn(rs.getString("sn"));
		vo.setFromNode(rs.getString("fromnode"));
		vo.setFromNodeName(rs.getString("fromnode_name"));
		vo.setSrcNodeName(rs.getString("srcnode_name"));
		vo.setToNode(rs.getString("tonode"));
		vo.setToNodeName(rs.getString("tonode_name"));
		vo.setDataContent(rs.getString("data_content"));
		vo.setStatus(rs.getString("status"));
		vo.setMtime(rs.getTimestamp("mtime"));
		vo.setRemark(rs.getString("remark"));
		vo.setDataType(rs.getString("data_type"));
		vo.setIsFromParent(rs.getString("isfromparent"));
		vo.setOperType(rs.getString("oper_type"));
		vo.setSyncUrl(rs.getString("syncurl"));
		return vo;
	}
}
